﻿@model BBICMS.Model.Category

@{
    ViewBag.Title = "创建分类";
    ViewBag.PageTitle = ViewBag.Title + "_产品管理";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutAdmin.cshtml";
}

@section header{
   

}

<div class="toolbar">
    <a href="#" class="showmenu"><i class="fa fa-bars"></i></a>
    <ol class="breadcrumb">
        <li><a href="@Url.Action("Index","Home")"><i class="glyphicon glyphicon-home"></i> 控制面板</a></li>
        <li><a href="#">广告管理</a></li>
        <li class="active">@ViewBag.Title</li>
    </ol>
</div>
<div class="main-content">

    <div class="box">
        <header class="box-header">
            <h3><i class="glyphicon glyphicon-edit"></i> @ViewBag.Title</h3>
            <div class="control">
                <a href="#" class="expand"><i class="glyphicon glyphicon-resize-full"></i></a>
                <a href="#" class="compress"><i class="glyphicon glyphicon-resize-small"></i></a>
            </div>
        </header>

        <section class="box-body">

            <div class="well well-sm">
                <a href="@Url.Action("Index","Category")" class="btn btn-default"><i class="glyphicon glyphicon-arrow-left"></i> 返回</a>
            </div>

       


                @using (Html.BeginForm("Edit", "Category", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
                {
                    @Html.AntiForgeryToken()
                    @Html.ValidationSummary(true)

                    @Html.HiddenFor(model => model.CategoryId)
                    @Html.HiddenFor(model => model.AddedBy)
                    @Html.HiddenFor(model => model.AddedDate)

                    <div class="form-group">
                        @Html.LabelFor(model => model.Title, new { @class = "col-lg-2 control-label" })
                        <div class="col-lg-6">
                            @Html.TextBoxFor(model => model.Title, new { @class = "form-control" })
                        </div>
                        <div class="col-lg-4">
                            @Html.ValidationMessageFor(model => model.Title)
                        </div>
                    </div>




                    <div class="form-group">
                        @Html.LabelFor(model => model.Importance, new { @class = "col-lg-2 control-label" })

                        <div class="col-lg-6">
                            @Html.TextBoxFor(model => model.Importance, new { @class = "form-control" })

                        </div>
                        <div class="col-lg-4">
                            @Html.ValidationMessageFor(model => model.Importance)
                        </div>
                    </div>

                    <div class="form-group">
                     
                        <div class="col-lg-10 col-lg-offset-2">
                            <div class="checkbox">
                                <label>
                                    @Html.EditorFor(model => model.Active) @Html.DisplayNameFor(model => model.Active)
                                    @Html.ValidationMessageFor(model => model.Active)
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-10">
                            <input type="submit" value="保存" class="btn btn-primary" />  @Html.ActionLink("返回", "Index", null, new { @class = "btn btn-default" })
                        </div>
                    </div>
                    if (Model.CategoryId > 0)
                    {
                        <div class="form-group">
                            <div class="col-lg-offset-2 col-lg-10">
                                <p class="text-muted">
                                    @Html.LabelFor(model => model.AddedBy)：@Html.DisplayFor(model => model.AddedBy)；@Html.LabelFor(model => model.AddedDate)：@Html.DisplayFor(model => model.AddedDate)；
                                    @Html.LabelFor(model => model.UpdatedBy)：@Html.DisplayFor(model => model.UpdatedBy)；@Html.LabelFor(model => model.UpdatedDate)：@Html.DisplayFor(model => model.UpdatedDate)
                                </p>
                            </div>
                        </div>
                    }
                }

        


        </section>
        <footer class="box-footer"></footer>
    </div>
</div>

@section footer{
    <script>
    $(function () {
        //当前菜单
        $('.mainmenu>li').eq(1).addClass('nav-open').find('.submenu li').eq(1).children('a').addClass('active');
    });
    </script>
}